package 集合;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class collections {
    public static void main(String[] args) {
        List<String> name=new ArrayList<>();
        Collections.addAll(name,"aeiruaghp","vpiughepir","阿伟死了","a8er7hp");
        System.out.println(name);
        Collections.sort(name);
        Collections.shuffle(name);
        System.out.println(name);
        Collections.sort(name,String::compareTo);
        System.out.println(name);
    }
}
